.palm-analysis {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Arial', sans-serif;
}

.page-header {
  text-align: center;
  margin-bottom: 30px;
}

.page-header h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-header p {
  color: #666;
  font-size: 1.1rem;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.tabs button {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tabs button.active {
  color: #45B7D1;
  border-bottom: 3px solid #45B7D1;
  font-weight: bold;
}

.analysis-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.upload-section {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.hand-type-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.hand-type-selector label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease;
  margin-bottom: 20px;
  background: white;
}

.upload-area:hover {
  border-color: #45B7D1;
}

.image-preview {
  position: relative;
}

.image-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 5px;
}

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
}

.upload-prompt p {
  margin: 10px 0;
}

.upload-prompt .hint {
  color: #999;
  font-size: 0.9rem;
}

.error-message {
  color: #e74c3c;
  margin: 15px 0;
  text-align: center;
}

.analyze-btn {
  width: 100%;
  padding: 15px;
  background: #45B7D1;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.analyze-btn:hover:not(:disabled) {
  background: #3A86FF;
}

.analyze-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.result-section-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  max-height: 80vh;
  overflow-y: auto;
}

.analysis-result h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.result-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.score {
  font-size: 1.2rem;
  font-weight: bold;
  color: #45B7D1;
}

.hand-type {
  font-size: 1rem;
  color: #666;
}

.result-section {
  margin-bottom: 25px;
}

.result-section h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.result-section p {
  color: #555;
  line-height: 1.6;
}

.result-section ul {
  padding-left: 20px;
}

.result-section li {
  margin-bottom: 8px;
  color: #555;
  line-height: 1.5;
}

.result-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.save-btn {
  width: 100%;
  padding: 12px;
  background: #4ECDC4;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 20px;
}

.save-btn:hover {
  background: #3db8af;
}

.lucky-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.color-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  margin-left: 10px;
  border: 1px solid #ddd;
}

.history-list {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

.history-list h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.history-item {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 5px;
  margin-bottom: 15px;
  transition: box-shadow 0.3s ease;
}

.history-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-time {
  color: #999;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .analysis-content {
    grid-template-columns: 1fr;
  }
  
  .tabs button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
}